 
<header id="header" class="mui-bar mui-bar-black mui-bar-nav">
    <a class="mui-icon mui-icon-left-nav mui-pull-left"  href="{:url('site/site_list')}"></a>
    <h1 class="mui-title">{$result.building_name}</h1>
</header>
 {include file="site/site_nav" /}
<div class="mui-content mui-content-my" style="padding-top: 0;margin-top: 1em">
    <div class="manager-list assets">
        <ul style="width: 100% ">


             {volist name="PropertyUse" id="v"}  
            <li class="mui-table-view-cell mui-collapse">
                <a class="mui-navigate-right" href="#">
<?php   $res = model('Dictionary')->where('code',$key)->find()->toArray(); 
echo $res['name'];
?> 
<span class="assets-num"><?php echo count($v);?></span></a>
                <div class="mui-collapse-content">
                    <ul class="mui-table-view mui-table-view-striped mui-table-view-condensed">
                        {volist name="v.data" id="vo"}  
                        <li class="mui-table-view-cell">
                            <div class="mui-table">
                                <div class="mui-table-cell mui-col-xs-7">
                                    <h4 style="font-size: 1.6em" class="mui-ellipsis">{$vo.property_name}</h4>
                                    <p style="margin-top: .5em;" class="mui-h5 mui-ellipsis">编号：{$vo.property_number}</p>
                                </div>
                                <div class="mui-table-cell mui-col-xs-3 mui-text-right">
                                    <span style="margin-right: .7em" class="mui-h5"><?php echo date('Y-m-d H:i:s',$vo['property_add_time']);?></span>
                                    <p class="assets-btn">使用中</p>
                                </div>
                            </div>
                        </li>
                         {/volist} 
                    </ul>
                </div>
            </li>
                {/volist} 



        </ul>
    </div>
</div>
   <div class="mui-content-padded btn-bottom-fixed"><a href="#">
    <button style="background: linear-gradient(-90deg, #3383FD, #78C2FF);border: none" type="button" class="mui-btn mui-btn-primary mui-btn-block">新增资产</button></a>
</div>
<script src="__CDN__/style/js/jquery-1.11.3.js"></script>
<script>
    $(function () {
        var startX=0,startY=0,moveEndX=0,moveEndY=0,X=0,Y=0,nowX=0;
        var a=$("#navBar");
        var navWidth=parseInt(a.css('width'));
        //var ulWidth=parseInt(a.children().css('width'));
        var ulWidth=parseInt(a.children().children().css('width'))*7+20;
        a.children().css('width',ulWidth);

        a.on("touchstart", function(e) {
            // e.preventDefault();
            startX = e.originalEvent.changedTouches[0].pageX;
            startY = e.originalEvent.changedTouches[0].pageY;
            nowX=parseInt(a.children().css('left'));
        });
        a.on("touchmove", function(e) {
            // e.preventDefault();
            moveEndX = e.originalEvent.changedTouches[0].pageX;
            moveEndY = e.originalEvent.changedTouches[0].pageY;
            X = moveEndX - startX;
            Y = moveEndY - startY;
            if ( Math.abs(X) > Math.abs(Y) && X > 0 ) {
                // alert("left 2 right");
                //console.log(X,Y);
                if((X+nowX)<0){
                    a.children().css('left',(X+nowX)+'px');
                }
            }
            else if ( Math.abs(X) > Math.abs(Y) && X < 0 ) {
                //alert("right 2 left");
                //console.log(navWidth,ulWidth,navWidth-ulWidth);
                //console.log(liWidth);
                if((X+nowX)>(navWidth-ulWidth)){
                    a.children().css('left',(X+nowX)+'px');
                }
            }
            else if ( Math.abs(Y) > Math.abs(X) && Y > 0) {
                //alert("top 2 bottom");
            }
            else if ( Math.abs(Y) > Math.abs(X) && Y < 0 ) {
                //alert("bottom 2 top");
            }
            else{
                //alert("just touch");
            }
        });
    });
</script>
 